package com.service;

import com.model.PlacedHospital;
import com.model.VenderDevice;
import com.page.GenericPage;
import com.po.*;
import com.result.Result;
import com.vo.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author: chihaojie
 * @Date: 2019/6/5 9:35
 * @Version 1.0
 * @Note
 */
public interface MiniProgramService {


    SysUserVO getSysUserInfo(Integer channelType, String openid) throws Exception;

    SysUserBindVo bindSysUser(Integer channelType, String id, String nickName, String openId, String userName, String password);

    Result<GenericPage<ProductVO>> getProductList(Integer pageNo,Integer pageSize, Integer productType,Long deviceId);

    VenderDeviceMiniPVO getVenderDevice(Long deviceId);

    Boolean replenishProduct(ReplenishPO replenishPO);

    BoxProductVO getBoxProduct(Long deviceId, String boxType, String boxNum);

    Result<WXMiniProgramPayResultVO> wxCreateOrder(OrderRequestParamPO orderRequestParamPO, HttpServletRequest request, HttpServletResponse response);

    Object wxNotify(HttpServletRequest request, HttpServletResponse response);

    Result<RentBedVO> rentBed(Integer channelType, String openId, Long deviceId, Long boxNum, HttpServletRequest request, HttpServletResponse response);

    OrdersBackQueryVO getGiveBackBed(Integer channelType, String openId, HttpServletRequest request, HttpServletResponse response);

    OrdersBackQueryVO getOrderById(Long orderId);

    WXMiniProgramPayResultVO giveBack(Integer channelType, String openId, Long deviceId, HttpServletRequest request, HttpServletResponse response);

    Boolean ackGiveBack(Long deviceId, String boxNum, String orderNum, HttpServletRequest request, HttpServletResponse response);

    CustomerAndAccountVO getCustomerAndAccount(Long customerId);

    RentBedVO preGiveBack(Integer channelType, String openId, Long deviceId, HttpServletRequest request, HttpServletResponse response);

    WXMiniProgramPayResultVO rechargeDeposit(Integer channelType, String openId, Long deviceId, HttpServletRequest request, HttpServletResponse response);

    Boolean judgeRegistered(Integer channelType, String openId, HttpServletRequest request, HttpServletResponse response);

    CustomerVO customerRegister(CustomerBindPhomeNumPo registerPO, HttpServletRequest request, HttpServletResponse response);


    Result<List<PlacedHospital>> getPlcacedHospital(Long agent);

    Result<VenderDeviceQueryVO> registDevice(VenderDevicePO venderDevicePO);

    Result<GenericPage<VenderDevice>> getDevicePage(VenderDeviceQueryPO venderDeviceQueryPO);

    Result<CustomerLoginData> wxValidateToken(String code, String nickname, String headImgUrl, HttpServletRequest request, HttpServletResponse response)throws  Exception;

    Result<Boolean> openLock(Long deviceId,Integer boxNum,Integer boxType);

    Result mockWXnotify(String orderNum, HttpServletRequest request, HttpServletResponse response);

    Boolean removeBoxProduct(Long deviceId, String boxType, String boxNum);

    void getMiniProgramCode(String sn, HttpServletRequest request, HttpServletResponse response);

    void getMiniProgramQRCode(String deviceSn, HttpServletRequest request, HttpServletResponse response);

    void getMiniProgramQRCodeNew(String deviceSn, HttpServletRequest request, HttpServletResponse response);

    void getMiniProgramProductBuyQRCode(Long deviceId, Long productId, HttpServletRequest request, HttpServletResponse response);

    void getMiniProgramProductBuyQRCodeNew(Long deviceId, Long productId, HttpServletRequest request, HttpServletResponse response);

    void getMiniProgramProductBuyCode(Long deviceId, Long productId, HttpServletRequest request, HttpServletResponse response);

    void getGiveBackBedQRCodeNew(Long deviceId, Long productId, HttpServletRequest request, HttpServletResponse response);

    Result<VenderDevice> judgeDeviceRegistered(String sn, Long agent);

    Result<BoxProductVO> getProductInfoByDeviceIdAndProductId(Long deviceId, Long productId);

    void getGiveBackBedQRCode(Long deviceId, Long productId, HttpServletRequest request, HttpServletResponse response);

    Result<String> getCustomerOpenIdByCode(String code, HttpServletRequest request, HttpServletResponse response) throws Exception;

    Result<List<VenderDevice>> getTenDeviceList();


    Result<List<OrdersVO>> getCustomerRechargeOrderList(Long customerId);

    Result mockRefund(String orderNum, HttpServletRequest request, HttpServletResponse response);

    Result<List<OrdersVO>> getCustomerOrderList(Long customerId);

    Result<GenericPage<OrdersVO>> getCustomerRentOrderList(Long customerId,Integer pageNo,Integer pageSize);

    Result<GenericPage<OrdersVO>> getCustomerSaleOrderList(Long customerId,Integer pageNo,Integer pageSize);

    Result<WXMiniProgramPayResultVO> wxRepay(WxRePayPO wxRePayPO, HttpServletRequest request, HttpServletResponse response);


    public Result<GenericPage<DeviceRepairApplyVO>> getDeviceRepairApplyPage(Long sysUserId, int pageNo, int pageSize);

    public Result<DeviceRepairApplyVO> getDeviceRepairApplyDetail(Long id);

    public Result<Boolean> troubleShootStatus(Long id, Integer troubleShootStatus);
}
